<?php
require_once "db.php";

$cinema_name = db_escape($_POST['rem_hall_cin']);
$hall_number = db_escape($_POST['rem_hall']);
$take_cinemaid = "SELECT * FROM cinema WHERE cinema_name = '$cinema_name'";
$get_cinemaid = db_query($take_cinemaid);
while ($cinemaid = mysqli_fetch_assoc($get_cinemaid)) {
		$cinema_id = $cinemaid['idcinema'];
	}

$query = "DELETE FROM halls WHERE cinema_idcinema = '$cinema_id' AND hall_number = '$hall_number'";
$result = db_query($query);
echo $hall_number;
